package xgenerator.ui.swing;

import java.awt.Component;

import javax.swing.JTable;
import javax.swing.table.DefaultTableCellRenderer;
import javax.swing.table.TableCellRenderer;

//public class ComboBoxTableCellRenderer implements TableCellRenderer {
public class ComboBoxTableCellRenderer extends DefaultTableCellRenderer {

	/**
	 * <p>
	 * Title：
	 * </p>
	 * @author <a href="mailto:shushanlee@msn.com">liss</a>
	 * @param table
	 * @param value
	 * @param isSelected
	 * @param hasFocus
	 * @param row
	 * @param column
	 * @return
	 * @see javax.swing.table.TableCellRenderer#getTableCellRendererComponent(javax.swing.JTable, java.lang.Object, boolean, boolean, int, int)
	 */
	public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
		Component cmp = super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);
		if (value == null) {
			return null;
		}
		return (Component) value;
	}

}
